Recently, IC cards having integrated circuits mounted thereon have been devised for use as various types of cards such as bank cards etc. As these IC cards are able to store significantly more information than previous magnetic cards etc., they have the advantage of greatly increasing the types of usage possible.
However, with IC card reader/writers which read data from and write data to IC cards, when data is read from or written to the integrated circuit mounted on the IC card, this is carried out through the contact section which is brought into contact with integrated circuit terminals, and a problem therefore exists in terms of the possibility of poor contact, that is to say contact error, at the contact section.
In prior IC card reader/writers, in order to judge whether or not the contact section was in proper contact with the integrated circuit terminals, under conditions in which the contact section of the IC card reader/writer was in contact with the integrated circuit terminals of the IC card, IC card power was supplied to the IC card's integrated circuit power supply terminal from the IC card reader/writer, through the contact section; together with this, a clock signal was supplied to the IC card's integrated circuit clock terminal through the contact section; in addition, the IC card's integrated circuit reset terminal was set to a high level; thereafter, the data which was automatically outputted from the IC card's integrated circuit input/output terminal was read; and judgement was made as to whether the IC card reader/writer contact section was in proper contact with the IC card's integrated circuit terminals, according to whether or not the read-out data was the same as the expected data.
However, in the conventional IC card reader/writers described above, wherein a clock signal is supplied to the IC card's integrated circuit clock terminal, the IC card's integrated circuit reset terminal is set to a high level, and thereafter, judgement is made as to whether or not the contact section of the IC reader/writer is properly in contact with the IC card's integrated circuit terminals, according to whether or not the data automatically outputted from the IC card's integrated circuit input/output terminal is the same as the expected data, there has been a problem in so much as there are cases wherein, for example, even if contact with the IC card's integrated circuit power supply terminal is poor, signals supplied to other terminals of the IC card's integrated circuit flow within the IC card's integrated circuit and are used as power; in such cases, regardless of the fact that the contact section of the IC card reader/writer is not in proper contact with the IC card's integrated circuit terminals, data which is the same as the expected data is output from the input/output terminal of the IC card's integrated circuit; and based on this, the contact section of the IC card reader/writer is mistakenly determined to be in proper contact with the IC card's integrated circuit terminals.
In such cases, while power sufficient for reading data from the IC card's integrated circuit input/output terminal may have been supplied, this power is not sufficient for writing data through the IC card's integrated circuit input/output terminal and, where data write processing is carried out through the IC card's integrated circuit input/output terminal in this condition, write errors sometimes occur.
There has been a problem in that, in general, when write errors of this sort occur with respect to IC cards, the security data which is stored in the integrated circuit may be destroyed, and in this case, further use of the card becomes impossible.
An object of the present invention is to provide an IC card reader/writer and a method for controlling the same, wherein contact errors with respect to a contact section which is brought into contact with an integrated circuit mounted on an IC card are reliably detected, and whereby it is possible to carry out suitable processing before write errors with respect to the IC card occur.